package com.gk.panda.apis.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gk.panda.apis.dto.EventToDoListSearchDto;
import com.gk.panda.apis.entity.eventtodo.dto.*;
import com.gk.panda.apis.entity.eventtodo.vo.EventToDoCountVo;
import com.gk.panda.apis.entity.eventtodo.vo.EventToDoDetailsVo;
import com.gk.panda.apis.entity.eventtodo.vo.EventToDoListByAppVo;
import com.gk.panda.apis.entity.eventtodo.vo.EventToDoListVo;
import com.gk.panda.pojo.DeviceManager;
import com.gk.panda.pojo.EventTodo;

import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * @ClassName: EventTodoService
 * @Description: 待办事件
 * @author: Sir.yang
 * @date: 2022/11/3 14:45
 * @version: 1.0
 **/
public interface EventTodoService extends IService<EventTodo> {

    /**
     * @description: 新增待办事件
     * @param: [dto]
     * @return: void
     * @date: 2022/11/4 11:10
     * @version: 1.0
     **/
    int saveEventTodoInfo(SaveEventTodoDto dto);

    /**
     * @description: 获取待办事件列表上的数据统计
     * @return: com.gk.panda.apis.entity.eventtodo.vo.EventToDoCountVo
     * @date: 2022/11/3 15:41
     * @version: 1.0
     **/
    EventToDoCountVo getEventToDoCount(EventToDoListSearchDto dto);


    /**
     * @description: 获取PC待办事件列表
     * @param: [dto]
     * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.gk.panda.apis.entity.eventtodo.vo.EventToDoListVo>
     * @date: 2022/11/3 15:57
     * @version: 1.0
     **/
    Page<EventToDoListVo> getEventToDoList(EventToDoListDto dto);

    /**
     * @description: 获取PC待办事件详情数据
     * @param: [eventId]
     * @return: com.gk.panda.apis.entity.eventtodo.vo.EventToDoDetailsVo
     * @date: 2022/11/3 16:12
     * @version: 1.0
     **/
    EventToDoDetailsVo getEventToDoDetails(Integer eventId);

    /**
     * @description: PC完成待办事件
     * @param: [eventId]
     * @return: boolean
     * @date: 2023年1月5日16:51:31
     * @version: 1.0
     **/
    boolean finishEventTodo(Integer eventId);

    /**
     * @description: PC删除待办事件
     * @param: [eventId]
     * @return: boolean
     * @date: 2023年1月5日17:19:11
     * @version: 1.0
     **/
    boolean deleteEventTodo(Integer eventId);

    /**
     * @description: 待办事件批量导出数据查询
     * @param: [dto]
     * @return: java.util.List<com.gk.panda.apis.entity.eventtodo.vo.EventToDoListVo>
     * @date: 2022/11/3 16:14
     * @version: 1.0
     **/
    List<EventToDoListVo> getBatchExportData(EventToDoListDto dto);

    /**
     * 保存红外相机电量不足事件
     *
     * @param device
     * @return
     */
    int saveBatteryEvent(DeviceManager device) throws UnsupportedEncodingException;


    /**
     * ----------------------------APP------------------------
     **/


    /**
     * @description: App待办事件列表数据统计
     * @param: [dto]
     * @return: java.lang.Integer
     * @date: 2022/11/4 10:57
     * @version: 1.0
     **/
    Long getEventToDoListCountForApp(EventTodoAppListDto dto);

    /**
     * @description: App待办事件列表数据获取
     * @param: [orgId]
     * @return: java.util.List<com.gk.panda.apis.entity.eventtodo.vo.EventToDoListByAppVo>
     * @date: 2022/11/3 22:45
     * @version: 1.0
     **/
    Page<EventToDoListByAppVo> getEventToDoListForApp(EventTodoAppListDto dto);

    /**
     * @description: 受理事件
     * @param: [AcceptanceEventDto]
     * @return: Integer
     * @date: 2022/11/3 22:48
     * @version: 1.0
     **/
    Integer acceptanceEvent(AcceptanceEventDto dto);

    /**
     * @description: 事件处理
     * @param: [dto]
     * @return: Integer
     * @date: 2022/11/3 23:36
     * @version: 1.0
     **/
    Integer handelEvent(HandelEventDto dto);

    /**
     * 导出待办事件
     * @param response
     */
    void exportEventTodo(HttpServletResponse response);
}
